Detailed notifications are meant to be single line, just as unexpanded
notification banners. So handle them the same way as in the message
list, and replace embedded newlines by spaces.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2463
box.add_child(textBox);
let title = new St.Label({
- text: source.title,
+ text: source.title.replace(/\n/g, ' '),
style_class: 'unlock-dialog-notification-label',
});
textBox.add(title);
let body = '';
if (n.bannerBodyText) {
+ const bodyText = n.bannerBodyText.replace(/\n/g, ' ');
body = n.bannerBodyMarkup
- ? n.bannerBodyText
- : GLib.markup_escape_text(n.bannerBodyText, -1);
+ ? bodyText
+ : GLib.markup_escape_text(bodyText, -1);
}
let label = new St.Label({ style_class: 'unlock-dialog-notification-count-text' });